package uk.co.q3c.deplan.client.ui.view.auto;

import java.util.Date;
import java.util.List;

import uk.co.q3c.deplan.client.domain.task.BaseTask;
import uk.co.q3c.deplan.client.ui.component.Q3CheckBox;
import uk.co.q3c.deplan.client.ui.component.Q3DateBox;
import uk.co.q3c.deplan.client.ui.component.ReferenceListWidget;
import uk.co.q3c.deplan.client.ui.component.ReferenceWidget;
import uk.co.q3c.deplan.client.ui.component.SublistWidget;
import uk.co.q3c.deplan.client.ui.component.TextBoxDouble;
import uk.co.q3c.deplan.client.ui.component.TextBoxInteger;
import uk.co.q3c.deplan.client.ui.component.TextBoxLong;
import uk.co.q3c.deplan.client.ui.component.TextBoxString;
import uk.co.q3c.deplan.client.ui.view.Q3ViewBasePanel;

import com.google.gwt.user.client.ui.Label;
import com.googlecode.objectify.Key;

public class ProjectTaskViewBase extends Q3ViewBasePanel implements ProjectTaskView {

	protected Label actualFinishLabel;
	protected Q3DateBox actualFinishWidget;
	protected Label actualStartLabel;
	protected Q3DateBox actualStartWidget;
	protected ReferenceWidget assignedResourceKeyWidget;
	protected Label assignedUnitsLabel;
	protected TextBoxDouble assignedUnitsWidget;
	protected Label discardedDateLabel;
	protected Q3DateBox discardedDateWidget;
	protected Q3CheckBox discardedWidget;
	protected Label durationLabel;
	protected TextBoxDouble durationWidget;
	protected Label finishLabel;
	protected Q3DateBox finishWidget;
	protected Q3CheckBox fixedDurationWidget;
	protected Label keyIdLabel;
	protected TextBoxLong keyIdWidget;
	protected Label nameLabel;
	protected TextBoxString nameWidget;
	protected ReferenceWidget parentTaskKeyWidget;
	protected ReferenceListWidget predecessorsKeysWidget;
	protected Label priorityLabel;
	protected TextBoxInteger priorityWidget;
	protected SublistWidget profilesWidget;
	private BaseTask AbstractTask;
	protected Label specificationLabel;
	protected TextBoxString specificationWidget;
	protected Label startRemainingLabel;
	protected Q3DateBox startRemainingWidget;
	protected ReferenceListWidget successorsKeysWidget;
	protected Label targetFinishDateLabel;
	protected Q3DateBox targetFinishDateWidget;
	protected Label targetStartDateLabel;
	protected Q3DateBox targetStartDateWidget;
	protected Label tempIdLabel;
	protected TextBoxInteger tempIdWidget;
	protected Q3CheckBox validWidget;
	protected Label workAllocatedLabel;
	protected TextBoxInteger workAllocatedWidget;
	protected Label workDoneLabel;
	protected TextBoxInteger workDoneWidget;
	protected Label workRemainingLabel;
	protected TextBoxInteger workRemainingWidget;

	public ProjectTaskViewBase() {
		super();
		construct();
		styles();
		layout();
		handlers();
	}

	public void construct() {
		actualFinishWidget = new Q3DateBox();
		actualFinishLabel = new Label("actual plannedFinish");
		actualStartWidget = new Q3DateBox();
		actualStartLabel = new Label("actual start");
		assignedResourceKeyWidget = new ReferenceWidget();
		assignedResourceKeyWidget.setLabelText("assigned resource");
		assignedUnitsWidget = new TextBoxDouble();
		assignedUnitsLabel = new Label("assigned units");
		discardedWidget = new Q3CheckBox();
		discardedWidget.setLabelText("discarded");
		discardedDateWidget = new Q3DateBox();
		discardedDateLabel = new Label("discarded date");
		durationWidget = new TextBoxDouble();
		durationLabel = new Label("duration");
		finishWidget = new Q3DateBox();
		finishLabel = new Label("plannedFinish");
		fixedDurationWidget = new Q3CheckBox();
		fixedDurationWidget.setLabelText("fixed duration");
		keyIdWidget = new TextBoxLong();
		keyIdLabel = new Label("id");
		nameWidget = new TextBoxString();
		nameLabel = new Label("name");
		parentTaskKeyWidget = new ReferenceWidget();
		parentTaskKeyWidget.setLabelText("parent task");
		predecessorsKeysWidget = new ReferenceListWidget();
		predecessorsKeysWidget.setLabelText("predecessors");
		priorityWidget = new TextBoxInteger();
		priorityLabel = new Label("priority");
		profilesWidget = new SublistWidget();
		profilesWidget.setLabelText("profiles");
		specificationWidget = new TextBoxString();
		specificationLabel = new Label("specification");
		startRemainingWidget = new Q3DateBox();
		startRemainingLabel = new Label("start remaining");
		successorsKeysWidget = new ReferenceListWidget();
		successorsKeysWidget.setLabelText("successors");
		targetFinishDateWidget = new Q3DateBox();
		targetFinishDateLabel = new Label("target plannedFinish date");
		targetStartDateWidget = new Q3DateBox();
		targetStartDateLabel = new Label("target start date");
		tempIdWidget = new TextBoxInteger();
		tempIdLabel = new Label("temp id");
		validWidget = new Q3CheckBox();
		validWidget.setLabelText("valid");
		workAllocatedWidget = new TextBoxInteger();
		workAllocatedLabel = new Label("work allocated");
		workDoneWidget = new TextBoxInteger();
		workDoneLabel = new Label("work done");
		workRemainingWidget = new TextBoxInteger();
		workRemainingLabel = new Label("work remaining");
	}

	public Q3DateBox getActualFinishWidget() {
		return actualFinishWidget;
	}

	public Date getActualFinishWidgetDataValue() {
		return actualFinishWidget.getDataValue();
	}

	public Q3DateBox getActualStartWidget() {
		return actualStartWidget;
	}

	public Date getActualStartWidgetDataValue() {
		return actualStartWidget.getDataValue();
	}

	public ReferenceWidget getAssignedResourceKeyWidget() {
		return assignedResourceKeyWidget;
	}

	public Key getAssignedResourceKeyWidgetDataValue() {
		return assignedResourceKeyWidget.getDataValue();
	}

	public TextBoxDouble getAssignedUnitsWidget() {
		return assignedUnitsWidget;
	}

	public double getAssignedUnitsWidgetDataValue() {
		return assignedUnitsWidget.getDataValue();
	}

	public Q3DateBox getDiscardedDateWidget() {
		return discardedDateWidget;
	}

	public Date getDiscardedDateWidgetDataValue() {
		return discardedDateWidget.getDataValue();
	}

	public Q3CheckBox getDiscardedWidget() {
		return discardedWidget;
	}

	public boolean getDiscardedWidgetDataValue() {
		return discardedWidget.getDataValue();
	}

	public TextBoxDouble getDurationWidget() {
		return durationWidget;
	}

	public double getDurationWidgetDataValue() {
		return durationWidget.getDataValue();
	}

	public Q3DateBox getFinishWidget() {
		return finishWidget;
	}

	public Date getFinishWidgetDataValue() {
		return finishWidget.getDataValue();
	}

	public Q3CheckBox getFixedDurationWidget() {
		return fixedDurationWidget;
	}

	public boolean getFixedDurationWidgetDataValue() {
		return fixedDurationWidget.getDataValue();
	}

	public TextBoxLong getKeyIdWidget() {
		return keyIdWidget;
	}

	public Long getKeyIdWidgetDataValue() {
		return keyIdWidget.getDataValue();
	}

	public TextBoxString getNameWidget() {
		return nameWidget;
	}

	public String getNameWidgetDataValue() {
		return nameWidget.getDataValue();
	}

	public ReferenceWidget getParentTaskKeyWidget() {
		return parentTaskKeyWidget;
	}

	public Key getParentTaskKeyWidgetDataValue() {
		return parentTaskKeyWidget.getDataValue();
	}

	public ReferenceListWidget getPredecessorsKeysWidget() {
		return predecessorsKeysWidget;
	}

	public List getPredecessorsKeysWidgetDataValue() {
		return predecessorsKeysWidget.getDataValue();
	}

	public TextBoxInteger getPriorityWidget() {
		return priorityWidget;
	}

	public int getPriorityWidgetDataValue() {
		return priorityWidget.getDataValue();
	}

	public SublistWidget getProfilesWidget() {
		return profilesWidget;
	}

	public List getProfilesWidgetDataValue() {
		return profilesWidget.getDataValue();
	}

	public TextBoxString getSpecificationWidget() {
		return specificationWidget;
	}

	public String getSpecificationWidgetDataValue() {
		return specificationWidget.getDataValue();
	}

	public Q3DateBox getStartRemainingWidget() {
		return startRemainingWidget;
	}

	public Date getStartRemainingWidgetDataValue() {
		return startRemainingWidget.getDataValue();
	}

	public ReferenceListWidget getSuccessorsKeysWidget() {
		return successorsKeysWidget;
	}

	public List getSuccessorsKeysWidgetDataValue() {
		return successorsKeysWidget.getDataValue();
	}

	public Q3DateBox getTargetFinishDateWidget() {
		return targetFinishDateWidget;
	}

	public Date getTargetFinishDateWidgetDataValue() {
		return targetFinishDateWidget.getDataValue();
	}

	public Q3DateBox getTargetStartDateWidget() {
		return targetStartDateWidget;
	}

	public Date getTargetStartDateWidgetDataValue() {
		return targetStartDateWidget.getDataValue();
	}

	public TextBoxInteger getTempIdWidget() {
		return tempIdWidget;
	}

	public int getTempIdWidgetDataValue() {
		return tempIdWidget.getDataValue();
	}

	public Q3CheckBox getValidWidget() {
		return validWidget;
	}

	public boolean getValidWidgetDataValue() {
		return validWidget.getDataValue();
	}

	public TextBoxInteger getWorkAllocatedWidget() {
		return workAllocatedWidget;
	}

	public int getWorkAllocatedWidgetDataValue() {
		return workAllocatedWidget.getDataValue();
	}

	public TextBoxInteger getWorkDoneWidget() {
		return workDoneWidget;
	}

	public int getWorkDoneWidgetDataValue() {
		return workDoneWidget.getDataValue();
	}

	public TextBoxInteger getWorkRemainingWidget() {
		return workRemainingWidget;
	}

	public int getWorkRemainingWidgetDataValue() {
		return workRemainingWidget.getDataValue();
	}

	protected void handlers() {
	}

	@Override
	protected void layout() {
	}

	public void setActualFinishWidget(Q3DateBox actualFinishWidget) {
		this.actualFinishWidget = actualFinishWidget;
	}

	public void setActualFinishWidgetDataValue(Date actualFinish) {
	}

	public void setActualFinishWidgetLabelText(String labelText) {
		actualFinishLabel.setText(labelText);
	}

	public void setActualStartWidget(Q3DateBox actualStartWidget) {
		this.actualStartWidget = actualStartWidget;
	}

	public void setActualStartWidgetDataValue(Date actualStart) {
	}

	public void setActualStartWidgetLabelText(String labelText) {
		actualStartLabel.setText(labelText);
	}

	public void setAssignedResourceKeyWidget(ReferenceWidget assignedResourceKeyWidget) {
		this.assignedResourceKeyWidget = assignedResourceKeyWidget;
	}

	public void setAssignedResourceKeyWidgetDataValue(Key assignedResourceKey) {
	}

	public void setAssignedResourceKeyWidgetLabelText(String labelText) {
		assignedResourceKeyWidget.setLabelText(labelText);
	}

	public void setAssignedUnitsWidget(TextBoxDouble assignedUnitsWidget) {
		this.assignedUnitsWidget = assignedUnitsWidget;
	}

	public void setAssignedUnitsWidgetDataValue(double assignedUnits) {
	}

	public void setAssignedUnitsWidgetLabelText(String labelText) {
		assignedUnitsLabel.setText(labelText);
	}

	public void setDiscardedDateWidget(Q3DateBox discardedDateWidget) {
		this.discardedDateWidget = discardedDateWidget;
	}

	public void setDiscardedDateWidgetDataValue(Date discardedDate) {
	}

	public void setDiscardedDateWidgetLabelText(String labelText) {
		discardedDateLabel.setText(labelText);
	}

	public void setDiscardedWidget(Q3CheckBox discardedWidget) {
		this.discardedWidget = discardedWidget;
	}

	public void setDiscardedWidgetDataValue(boolean discarded) {
	}

	public void setDiscardedWidgetLabelText(String labelText) {
		discardedWidget.setLabelText(labelText);
	}

	public void setDurationWidget(TextBoxDouble durationWidget) {
		this.durationWidget = durationWidget;
	}

	public void setDurationWidgetDataValue(double duration) {
	}

	public void setDurationWidgetLabelText(String labelText) {
		durationLabel.setText(labelText);
	}

	public void setFinishWidget(Q3DateBox finishWidget) {
		this.finishWidget = finishWidget;
	}

	public void setFinishWidgetDataValue(Date finish) {
	}

	public void setFinishWidgetLabelText(String labelText) {
		finishLabel.setText(labelText);
	}

	public void setFixedDurationWidget(Q3CheckBox fixedDurationWidget) {
		this.fixedDurationWidget = fixedDurationWidget;
	}

	public void setFixedDurationWidgetDataValue(boolean fixedDuration) {
	}

	public void setFixedDurationWidgetLabelText(String labelText) {
		fixedDurationWidget.setLabelText(labelText);
	}

	public void setKeyIdWidget(TextBoxLong keyIdWidget) {
		this.keyIdWidget = keyIdWidget;
	}

	public void setKeyIdWidgetDataValue(Long keyId) {
	}

	public void setKeyIdWidgetLabelText(String labelText) {
		keyIdLabel.setText(labelText);
	}

	public void setNameWidget(TextBoxString nameWidget) {
		this.nameWidget = nameWidget;
	}

	public void setNameWidgetDataValue(String name) {
	}

	public void setNameWidgetLabelText(String labelText) {
		nameLabel.setText(labelText);
	}

	public void setParentTaskKeyWidget(ReferenceWidget parentTaskKeyWidget) {
		this.parentTaskKeyWidget = parentTaskKeyWidget;
	}

	public void setParentTaskKeyWidgetDataValue(Key parentTaskKey) {
	}

	public void setParentTaskKeyWidgetLabelText(String labelText) {
		parentTaskKeyWidget.setLabelText(labelText);
	}

	public void setPredecessorsKeysWidget(ReferenceListWidget predecessorsKeysWidget) {
		this.predecessorsKeysWidget = predecessorsKeysWidget;
	}

	public void setPredecessorsKeysWidgetDataValue(List predecessorsKeys) {
	}

	public void setPredecessorsKeysWidgetLabelText(String labelText) {
		predecessorsKeysWidget.setLabelText(labelText);
	}

	public void setPriorityWidget(TextBoxInteger priorityWidget) {
		this.priorityWidget = priorityWidget;
	}

	public void setPriorityWidgetDataValue(int priority) {
	}

	public void setPriorityWidgetLabelText(String labelText) {
		priorityLabel.setText(labelText);
	}

	public void setProfilesWidget(SublistWidget profilesWidget) {
		this.profilesWidget = profilesWidget;
	}

	public void setProfilesWidgetDataValue(List profiles) {
	}

	public void setProfilesWidgetLabelText(String labelText) {
		profilesWidget.setLabelText(labelText);
	}

	public void setSpecificationWidget(TextBoxString specificationWidget) {
		this.specificationWidget = specificationWidget;
	}

	public void setSpecificationWidgetDataValue(String specification) {
	}

	public void setSpecificationWidgetLabelText(String labelText) {
		specificationLabel.setText(labelText);
	}

	public void setStartRemainingWidget(Q3DateBox startRemainingWidget) {
		this.startRemainingWidget = startRemainingWidget;
	}

	public void setStartRemainingWidgetDataValue(Date startRemaining) {
	}

	public void setStartRemainingWidgetLabelText(String labelText) {
		startRemainingLabel.setText(labelText);
	}

	public void setSuccessorsKeysWidget(ReferenceListWidget successorsKeysWidget) {
		this.successorsKeysWidget = successorsKeysWidget;
	}

	public void setSuccessorsKeysWidgetDataValue(List successorsKeys) {
	}

	public void setSuccessorsKeysWidgetLabelText(String labelText) {
		successorsKeysWidget.setLabelText(labelText);
	}

	public void setTargetFinishDateWidget(Q3DateBox targetFinishDateWidget) {
		this.targetFinishDateWidget = targetFinishDateWidget;
	}

	public void setTargetFinishDateWidgetDataValue(Date targetFinishDate) {
	}

	public void setTargetFinishDateWidgetLabelText(String labelText) {
		targetFinishDateLabel.setText(labelText);
	}

	public void setTargetStartDateWidget(Q3DateBox targetStartDateWidget) {
		this.targetStartDateWidget = targetStartDateWidget;
	}

	public void setTargetStartDateWidgetDataValue(Date targetStartDate) {
	}

	public void setTargetStartDateWidgetLabelText(String labelText) {
		targetStartDateLabel.setText(labelText);
	}

	public void setTempIdWidget(TextBoxInteger tempIdWidget) {
		this.tempIdWidget = tempIdWidget;
	}

	public void setTempIdWidgetDataValue(int tempId) {
	}

	public void setTempIdWidgetLabelText(String labelText) {
		tempIdLabel.setText(labelText);
	}

	public void setValidWidget(Q3CheckBox validWidget) {
		this.validWidget = validWidget;
	}

	public void setValidWidgetDataValue(boolean valid) {
	}

	public void setValidWidgetLabelText(String labelText) {
		validWidget.setLabelText(labelText);
	}

	public void setWorkAllocatedWidget(TextBoxInteger workAllocatedWidget) {
		this.workAllocatedWidget = workAllocatedWidget;
	}

	public void setWorkAllocatedWidgetDataValue(int workAllocated) {
	}

	public void setWorkAllocatedWidgetLabelText(String labelText) {
		workAllocatedLabel.setText(labelText);
	}

	public void setWorkDoneWidget(TextBoxInteger workDoneWidget) {
		this.workDoneWidget = workDoneWidget;
	}

	public void setWorkDoneWidgetDataValue(int workDone) {
	}

	public void setWorkDoneWidgetLabelText(String labelText) {
		workDoneLabel.setText(labelText);
	}

	public void setWorkRemainingWidget(TextBoxInteger workRemainingWidget) {
		this.workRemainingWidget = workRemainingWidget;
	}

	public void setWorkRemainingWidgetDataValue(int workRemaining) {
	}

	public void setWorkRemainingWidgetLabelText(String labelText) {
		workRemainingLabel.setText(labelText);
	}

	protected void styles() {
	}

}